package com.example.productviewservicefeign.service;

import com.example.productviewservicefeign.dao.entity.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(value="ProductDataService",fallback = ProductClientFeignHystix.class)
public interface ProductClientFeign {
    @GetMapping("/products")
    public List<Product> listProducts();
}
